<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>查看修改意见</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css" media="all">
    <script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script src="../js/jquery-3.1.1.min.js"></script>
    <style>
        body {
            background: rgb(255, 255, 255);
        }

        #main_body {
            position: absolute;
            top: 70px;
            left: 250px;
            width: min-content;
        }

        .long {
            position: absolute;
            width: 400px;
            height: 40px;
            font-size: larger;
        }

        .time {
            height: 30px;
            width: 100px;
            font-size: xx-large;
        }

        .gao {
            height: 80px;
        }
    </style>
</head>

<body>

    <div id="main_body">
    </div>
    <script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script src="../js/lay-config.js?v=2.0.0" charset="utf-8"></script>
    <script>
        layui.use(['jquery', 'layer'], function () {
            var $ = layui.jquery,
                layer = layui.layer;
            var aname = localStorage.getItem('aname');
            console.log("aaaa" + aname);
            $(function () {
                $.get('/seeSuggestion', {
                    aname: aname
                }, function (re) {
                    console.log("reee" + re)
                    if (re == '0') {
                        layer.msg("暂无修改建议");
                        $('#main_body').css({
                            "background-image": "url(../images/noActivity.png)",
                            "background-size": "100% 100%"
                        });
                    } else {
                        var obj = re.data;
                        var len = re.count;
                        console.log("rrr" + len);
                        var html = "<ul class='layui-timeline'>";
                        for (var i = 0; i < len; i++) { //搞搞！
                            html = html + '<li class = "layui-timeline-item">\
                                <i class = "layui-icon layui-timeline-axis" >&#xe63f;</i>\
                                <div class = "layui-timeline-content layui-text gao" >\
                                <h3 class = "layui-timeline-title time" >' + obj[i].time + '</h3> <p class="long">' +
                                obj[i].com_name + ":" + obj[i].content + ' </p> </div> </li>'
                        }
                        // html = html + '</ul>'
                        add = '<li class = "layui-timeline-item">\
                                <i class = "layui-icon layui-timeline-axis" >&#xe63f;</i>\
                                <div class = "layui-timeline-content layui-text gao" >\
                                <h3 class = "layui-timeline-title time" >现在</h3> <p class="long"></p> </div> </li>'
                        html = html + add;
                        // console.log(html)
                        $('#main_body').html(html);
                    }
                })
            })
        });
    </script>
</body>


</html>